<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition>
	<h:panelGrid id="userInfoInputPanel" columns="2" style="width:100%">

		<h:outputText value="id" />
		<h:outputText value="#{userModel.current.id}" />
		<h:outputText value="#{msgs.title}" />
		<p:selectOneMenu value="#{userModel.current.title}">
			<f:selectItems value="#{userModel.availableTitles}" var="titles"
				itemValue="#{title}" itemLabel="#{titles.label}"></f:selectItems>
		</p:selectOneMenu>
		<h:outputText value="First Name" />
		<p:inputText value="#{userModel.current.firstName}" />
		<h:outputText value="Last Name" />
		<p:inputText value="#{userModel.current.lastName}" />
		<h:outputText value="Drop-off location" />
		<h:panelGrid columns="2">
			<h:outputText
				value="#{userModel.current.dropOffLocation.name}   #{userModel.current.dropOffLocation.address}  " />
			<p:commandButton actionListener="#{locationController.init}"
				ajax="true" update=":dialogForm,:headerForm" value="Choose"
				oncomplete="locationDlg.show()"></p:commandButton>
		</h:panelGrid>

		<h:outputText value="Address" />
		<p:inputText value="#{userModel.current.address}" style="width:800px"/>
		<h:outputText value="Balance" />
		<p:inputText value="#{userModel.current.balance}"
			style="text-align:right">
			<f:convertNumber minFractionDigits="2" maxFractionDigits="2" />
		</p:inputText>
		<h:outputText value="Access code (For main entrance)" />
		<p:inputText value="#{userModel.current.accessCode}" />
		<h:outputText value="Telephone" />
		<p:inputMask mask="(999)999-9999"
			value="#{userModel.current.telephone}" />
		<h:outputText value="Mobile phone" />
		<p:inputMask mask="(999)999-9999"
			value="#{userModel.current.mobilePhone}" />

		<h:outputText value="Email" />
		<p:inputText value="#{userModel.current.email}" style="width:400px" />
		<h:outputText value="Password" />
		<p:inputText value="#{userModel.current.password}" />

		<h:outputText value="Prefer language" />
		<p:selectOneMenu value="#{userModel.current.language}">
			<f:selectItems value="#{userModel.availableLanguages}" var="language"
				itemValue="#{language}" itemLabel="#{language.label}" />
		</p:selectOneMenu>

		<h:outputText value="Password question" />
		<h:outputText value="#{userModel.current.passwordQuestion}"></h:outputText>


		<h:outputText value="Password answer" />
		<h:outputText value="#{userModel.current.passwordAnswer}" />

		<p:selectBooleanCheckbox
			value="#{userModel.current.isEmailOrderStatus}"
			itemLabel="Email order status" />
		<p:selectBooleanCheckbox value="#{userModel.current.isPrepaid}"
			itemLabel="Is prepaid needed" />

		<p:selectBooleanCheckbox value="#{userModel.current.isActivated}"
			itemLabel="Is activated" />

		<p:selectBooleanCheckbox value="#{userModel.current.isEnabled}"
			itemLabel="Is enabled" />

		<p:selectBooleanCheckbox value="#{userModel.current.isLocked}"
			itemLabel="Is locked" />

		<p:selectBooleanCheckbox value="#{userModel.current.isExpired}"
			itemLabel="Is expired" />
		<h:outputText value="Created Date" />
		<h:outputText value="#{userModel.current.createdDate}" />
		<h:outputText value="Memo" />
		<p:inputTextarea value="#{userModel.current.memo}" style="width:800px;height:120px"/>
	</h:panelGrid>
</ui:composition>

</html>